using System;

namespace SharpMud.Server.Systems
{
	/// <summary>
	/// This enumeration defines constants that designate the current status of a server system
	/// </summary>
	public enum ServerSystemStatus
	{
		Uninitialized,
		Initializing,
		Initialized,
		Starting,
		Running,
		Pausing,
		Paused,
		Resuming,
		Stopping,
		Stopped,
		Disposing,
		Disposed
	}

	/// <summary>
	/// Instances of this class are used to designate a status change in a server system
	/// </summary>
	public class ServerSystemStatusChangeEventArgs : System.EventArgs
	{
		private ServerSystemStatus _OldStatus;
		private ServerSystemStatus _NewStatus;

		private ServerSystemStatusChangeEventArgs()
		{
		}

		/// <param name="oldStatus">The status of the server system before the status change</param>
		/// <param name="newStatus">The status of the server system after the status change</param>
		public ServerSystemStatusChangeEventArgs(ServerSystemStatus oldStatus, ServerSystemStatus newStatus)
		{
			_OldStatus = oldStatus;
			_NewStatus = newStatus;
		}

		/// <summary>
		/// The status of the server system before the status change
		/// </summary>
		public ServerSystemStatus OldStatus
		{
			get
			{
				return _OldStatus;
			}
		}

		/// <summary>
		/// The status of the server system after the status change
		/// </summary>
		public ServerSystemStatus NewStatus
		{
			get
			{
				return _NewStatus;
			}
		}
	}
}
